#!/bin/sh
FILE=$1
CLASS=$2
if [[ ! -f "$FILE" ]]; then
	echo "$FILE not exist, or not a file."
	exit -1
fi
if [[ -z "$CLASS" ]]; then
	exit -2
fi
EXEC_PATH="/data/local/tmp/exec_file"
adb shell rm -f $EXEC_PATH
adb push $FILE $EXEC_PATH
#adb shell CLASSPATH=$EXEC_PATH exec app_process / $CLASS
adb shell app_process -Djava.class.path=$EXEC_PATH / $CLASS
exit 0